﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="addProductClass.aspx.cs" Inherits="admin_addProductClass" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <link rel="stylesheet" type="text/css" href="html/css/admin.css" />
    <link rel="stylesheet" type="text/css" href="html/css/common.css" />
    <script type="text/javascript" language="javascript" src="../js/jquery-1.3.2.min.js"></script>    
    <script type="text/javascript" language="javascript" src="../js/GetAjax.js"></script>
    <style type="text/css">   
    .STYLE1 {
	    color: #e1e2e3;
    }
    .STYLE19 {
	    color: #344b50;
    }
    .STYLE21 {	
	    color: #3b6375;
    }
    .STYLE22 {	
	    color: #295568;
    }  
    </style>
</head>
<script type="text/javascript" language="javascript">
$(function(){
    $("#btn_sub").bind("click",function(){
        $("#loading").show();
        var url="";
        var param="";
        var action=$("#hid_action").val();
        if(action=="add")
        {
            url="?action=add";
        }
        else if(action=="save")
        {
            url="?action=save";
        }    
        param="&productClassName="+escape($("#txt_productClassName").attr("value"))
            +"&productClassInfo="+escape($("#txt_info").attr("value"))
            +"&pcid="+$("#hid_id").val()
            +"&title="+$("#txt_title").val()
            +"&description="+$("#txt_seoDescription").val()
            +"&key="+$("#txt_key").val();
        url=convertURL(url);
        ajax_post(url,param,function(msg){
            if(msg=="1")
            {
                alert("添加成功");
                $("#txt_productClassName").attr("value","");                
                $("#txt_info").attr("value","");
                $("#loading").hide();
            }
            else if(msg=="2")
            {
                alert("修改成功");
                document.location.href="addProductClass.aspx";                    
            }            
        }); 
    });
});
</script>
<body onload="$('#loading').hide()">
<div id="loading" style="display:block">   
    <div class="loading-indicator">   
        页面正在加载中...   
    </div>   
</div> 
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="24" bgcolor="#353c44"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="30" height="19" valign="bottom"><div align="center" style="width:30px"><img src="html/images/tb.gif" width="14" height="14" /></div></td>
                <td valign="bottom"><span class="STYLE1">添加/编辑产品类别</span></td>
              </tr>
            </table></td>
            <td></td>
          </tr>
        </table></td>
      </tr>
    </table>
	</td>
  </tr>
  <tr>
    <td>
	<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce">      
      <tr>
        <td width="200" height="20" align="center" bgcolor="#FFFFFF" class="STYLE21">产品名称：</td>
        <td bgcolor="#FFFFFF"><input name="" type="text" class="commonText" style="width:200px" id="txt_productClassName" runat="server"/>
          &nbsp;<span style="color:red">*</span></td>        
        </tr>
        <tr>
        <td width="200" align="center" bgcolor="#FFFFFF" class="STYLE21">相关描述：</td>
        <td bgcolor="#FFFFFF">
        <textarea style="width:600px; height:200px" name="textfield2" id="txt_info" runat="server"></textarea>      
        </td>
        </tr>
		<tr>
        <td width="200" height="20" align="center" bgcolor="#FFFFFF" class="STYLE21">页面标题：</td>
        <td bgcolor="#FFFFFF">            
            <textarea id="txt_title" runat="server" name="txt_title" style="width: 490px; height: 69px" 
                cols="20" rows="1">例如:XXXXX产品-xxx公司名称</textarea></td>
        </tr>
        <tr>
        <td width="200" height="20" align="center" bgcolor="#FFFFFF" class="STYLE21">页面关键字：</td>
        <td bgcolor="#FFFFFF">            
            <textarea id="txt_key" runat="server" name="txt_key" style="width: 490px; height: 69px" 
                cols="20" rows="1">关键字A,关键字B,关键字C,关键字D</textarea></td>
        </tr>
      <tr>
        <td width="200" height="20" align="center" bgcolor="#FFFFFF" class="STYLE21">页面描叙：</td>
        <td bgcolor="#FFFFFF">            
            <textarea id="txt_seoDescription" runat="server" name="txt_seoDescription" 
                style="width: 490px; height: 69px" cols="20" rows="1">例如:XXXXX产品-xxx公司名称</textarea></td>
        </tr>      
      <tr>
        <td height="24" id="btn_enter" align="center" bgcolor="#FFFFFF"></td>
        <td bgcolor="#FFFFFF"><input name="Input" value="确认添加" type="button" class="btn" id="btn_sub"/></td>
      </tr>
    </table></td>
  </tr> 
</table>
    <input id="hid_action" type="hidden" runat="server" Value="add" />  
    <input id="hid_id" type="hidden" runat="server" Value="0"/>   
</body>
</html>
